package com.ld.control.business.user.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author wangfeng
 * @since 2024-04-12
 */
@Data
@TableName("menu")
@Schema(description="系统菜单表")
public class MenuModel implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "父级菜单id,0是最外层菜单")
    private Long parentId;

    @Schema(description = "菜单code")
    private String code;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "菜单路径")
    private String url;

    @Schema(description = "0:页面，1:按钮")
    private Integer type;

    @Schema(description = "层级1-2-3")
    private String level;

    @Schema(description = "对于后端接口,如果不请求接口则为null")
    private String apiUrl;

    @Schema(description = "排序值")
    private Integer sort;

    @Schema(description = "创建人id")
    private Long createBy;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新人")
    private Long updateBy;

    @Schema(description = "更新时间")
    private Date updateTime;


    public static final String ID = "id";

    public static final String PARENT_ID = "parent_id";

    public static final String NAME = "name";

    public static final String ICON = "icon";

    public static final String URL = "url";

    public static final String TYPE = "type";

    public static final String LEVEL = "level";

    public static final String API_URL = "api_url";

    public static final String SORT = "sort";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

}
